﻿using Abp.Application.Services.Dto;
using FwProject.Comm.ExcelUtil;
using FwProject.ShoppingMall.Com;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace FwProject.Com.Dto
{
    [DisplayName(displayName: "商城订单")]
    public class ShopOrderExportDto : EntityDto<Guid>
    {
        [ExcelDateMember(IsMerged = true)]
        [DisplayName(displayName: "订单编号")]
        public string OrderNumber { get; set; }

        [ExcelDateMember(IsMerged = true)]
        [DisplayName(displayName: "下单日期")]
        public DateTime CreationTime { get; set; }
        
        [ExcelDateMember(IsMerged = true)]
        [DisplayName(displayName: "订单总额")]
        public decimal PayTotal { get; set; }

        [ExcelDateMember(IsMerged = true)]
        [DisplayName(displayName: "实付金额")]
        public decimal PayAmount { get; set; }

        [ExcelDateMember(IsMerged = true)]
        [DisplayName(displayName: "支付状态")]
        public PayStatus PayStatus { get; set; }

        [ExcelDateMember(IsMerged = true)]
        [DisplayName(displayName: "付款时间")]
        public DateTime? PayTime { get; set; }

        [ExcelDateMember(IsMerged = true)]
        [DisplayName(displayName: "收货人")]
        public string ReceivingName { get; set; }

        [ExcelDateMember(IsMerged = true)]
        [DisplayName(displayName: "收货电话")]
        public string ReceivingTel { get; set; }

        [ExcelDateMember(IsMerged = true)]
        [DisplayName(displayName: "收货地址")]
        public string ReceivingAddress { get; set; }

        [ExcelDateMember(IsMultiRow = true, IsClass = true)]
        public List<ShopOrderDetilsExportDto> ShopOrderDetils { get; set; }

    }

    public class ShopOrderDetilsExportDto
    {
        [ExcelDateMember(IsMultiRow = true)]
        [DisplayName(displayName: "商品名称")]
        public string ShopProductName { get; set; }

        [ExcelDateMember(IsMultiRow = true)]
        [DisplayName(displayName: "购买数量")]
        public int ProductCount { get; set; }

        [ExcelDateMember(IsMultiRow = true)]
        [DisplayName(displayName: "单价")]
        public decimal PayPrice { get; set; }

        [ExcelDateMember(IsMultiRow = true)]
        [DisplayName(displayName: "规格")]
        public string SkuName { get; set; }

        [ExcelDateMember(IsMultiRow = true)]
        [DisplayName(displayName: "退货状态")]
        public Returngoods Returngoods { get; set; }

        [ExcelDateMember(IsMultiRow = true)]
        [DisplayName(displayName: "退货金额")]
        public decimal ReturngoodsPrice { get; set; }

        [ExcelDateMember(IsMultiRow = true)]
        [DisplayName(displayName: "退货订单号")]
        public string refundNo { get; set; }

        [ExcelDateMember(IsMultiRow = true)]
        [DisplayName(displayName: "发货状态")]
        public DeliveryStatus DeliveryStatus { get; set; }

        [ExcelDateMember(IsMultiRow = true)]
        [DisplayName(displayName: "发货时间")]
        public DateTime? DeliveryTime { get; set; }

        [ExcelDateMember(IsMultiRow = true)]
        [DisplayName(displayName: "评价状态")]
        public EvaluateStatus EvaluateStatus { get; set; }

        [ExcelDateMember(IsMultiRow = true)]
        [DisplayName(displayName: "结算状态")]
        public SettlementStatus SettlementStatus { get; set; }

        [ExcelDateMember(IsMultiRow = true)]
        [DisplayName(displayName: "结算时间")]
        public DateTime? SettlementTime { get; set; }

        [ExcelDateMember(IsMultiRow = true)]
        [DisplayName(displayName: "差价")]
        public decimal PriceDifference { get; set; }


    }
}
